package com.woniuxy.searchassembly.service.impl;

import com.woniuxy.searchassembly.model.SightPoint;
import com.woniuxy.searchassembly.dao.SightPointMapper;
import com.woniuxy.searchassembly.service.ISightPointService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Kevin Kwok
 * @since 2021-05-24
 */
@Service
public class SightPointServiceImpl extends ServiceImpl<SightPointMapper, SightPoint> implements ISightPointService {

    @Resource
    private SightPointMapper sightPointMapper;


    @Override
    public List<String> queryArea(String area) {
        List<String> sights = sightPointMapper.queryArea(area);
        return sights;
    }

    @Override
    public SightPoint querySightInfo(String name) {
        SightPoint sightPoint = sightPointMapper.querySightInfo(name);
        return sightPoint;
    }

    @Override
    public int addNewSights(SightPoint sightPoint) {
        int i = sightPointMapper.addNewSight(sightPoint);
        return i;
    }
}
